//
// Created by 束庆乐 on 2024/12/29.
//

#include "iostream"
using namespace std;

int main021(){
    int a = 3;
    int* ptr = &a;
    cout << ptr << endl;
    int arr[] = {1,2,3};
    cout << "数组占用内存空间：" << sizeof(arr) << endl;
    cout << "数组每个元素占用内存：" << sizeof(arr[0]) << endl;
    cout << "数组中元素个数：" << sizeof(arr)/sizeof(arr[0]) << endl;

    cout << "数组首地址：" << (int*)arr << endl;
    cout << "数组首地址：" << arr << endl;
    cout << "数组中第一个元素地址：" << (int*)&arr[0] << endl;
    cout << "数组中第二个元素地址：" << &arr[1] << endl;

    return 0;
}
